package com.ljf.bean;

import com.ljf.common.group.ISave;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

@Data
@ApiModel("供应商")
public class Supplier {
    @ApiModelProperty("供应商id")
    int id;
    @ApiModelProperty("供应商名称")
    @NotBlank(message = "供应商名称不能为空")
    String name;
    @ApiModelProperty("供应商地区")
    String area;
    @ApiModelProperty("供应商地址")
    String address;
    @ApiModelProperty("公司简介")
    String describes;
    @ApiModelProperty("主营产品")
    int s_category_id;
    @ApiModelProperty("报价系数")
    String factor;
    @ApiModelProperty("公司logo")
    String logo;
    @ApiModelProperty("材质种类")
    int material_id;
    @ApiModelProperty("营业执照")
    String licences;
    @ApiModelProperty("账号")
    @NotBlank(message = "账号不能为空！", groups = {ISave.class})
    String account;

    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空！", groups = {ISave.class})
    String password;
    @ApiModelProperty("供应商联系人")
    @Valid
    SupplierContact contact;
}
